﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 经典项目某某管理系统.Basic;
using 经典项目某某管理系统.Erp;
using 经典项目某某管理系统.DataSelect;

namespace 经典项目某某管理系统
{
    public partial class FrmMain : Form
    {
        private string UserName;
        public FrmMain()
        {
            InitializeComponent();
        }
        public FrmMain(string UserName)
        {
            this.UserName = UserName;
            InitializeComponent();
        }

        private void FrmMain_FormClosed(object sender, FormClosedEventArgs e)
        {
            //当前窗体退出 
            Application.Exit();
        }
        private void Timer_Tick(object sender, EventArgs e)
        {
            DateTime dt = DateTime.Now;
            this.label3.Text = dt.ToString("yyyy-MM-dd HH:mm:ss");
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            DateTime dt = DateTime.Now;
            this.label3.Text = dt.ToString("yyyy-MM-dd HH:mm:ss");
            this.label2.Text = "欢迎您，" + LoginCtl.SalesmamanName;
            Timer timer = new Timer();
            timer.Interval = 1000; // 每秒触发一次
            timer.Tick += Timer_Tick;
            //timer.Start();
        }

        private void tabPage2_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox10_Click(object sender, EventArgs e)
        {
            FrmType frmType = new FrmType();
            frmType.MdiParent = this;
            frmType.Show();
            frmType.Top = 250;
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            FrmCash frmCash = new FrmCash();
            frmCash.Show();
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            FrmGoodView frmGoodView =new FrmGoodView();
            frmGoodView.MdiParent = this;
            frmGoodView.Show();
            frmGoodView.Top = 250;
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            FrmGoodPutIn frmGoodOutIn = new FrmGoodPutIn();
            frmGoodOutIn.MdiParent = this;
            frmGoodOutIn.Show();
            frmGoodOutIn.Top = 250;
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            FrmSalary frmSalary = new FrmSalary();
            frmSalary.MdiParent = this;
            frmSalary.Show();
            frmSalary.Top = 250;
        }
    }
}
